home *** CD-ROM | disk | FTP | other *** search
- Path: citr.uq.oz.au!usenet
- From: martin@cooloola.citr.uq.oz.au (Martin Pool)
- Newsgroups: comp.lang.c++
- Subject: Old Fortran dog learning new Visual C++ tricks - some questions [re: 1]
- Date: 06 Feb 1996 04:25:42 GMT
- Organization: CiTR
- Message-ID: <MARTIN.96Feb6142542@cooloola.citr.uq.oz.au>
- References: <4en04g$5nv@news-2.csn.net>
- NNTP-Posting-Host: cooloola.citr.uq.oz.au
- In-reply-to: charles stoyer's message of 31 Jan 1996 05:53:20 GMT
-
- In article <4en04g$5nv@news-2.csn.net> charles stoyer <cstoyer@support.interpex.com> writes:
-
- Isn't the Developer Studio gorgeous! I thought nothing would beat emacs for
- coding, but this comes pretty close. It's different, and not as good in some
- areas, but great in its own way.
-
- > 1. What is a .PCH file and what is it for? It is huge (4Mb)
- > even for small programs and exists in both the Release and
- > Debug directories. I can't find any reference to it in the
- > documentation. Do I need it and can I turn it off?
-
- A PCH is a Pre-Compiled Header. Roughly speaking, the idea is to save you from
- recompiling the (huge) Windows header files each time you compile a file which
- uses them. After reading your source the first time, the compiler spits out a
- pre-digested version of the headers.
-
- I think you can control this from somewhere in the 'Build/Settings' dialog.
-
- You don't _need_ it, but I wouldn't be without it. On my machine (486, 48megs
- of ram) it cuts ~50 seconds off the build time. To me, 4megs of disk sounds
- like a pretty good price to pay.
-
- > 2. You can't call an item which expects a string or string
- > pointer with a Cstring argument. Is there some way to copy to
- > or recast as a Cstring to a string or string pointer?
-
- CString (note caps) defines operator const char * which will allow you to
- convert it to a char *. This is of course a const pointer, as it points into
- memory allocated by the CString. Read the docs for other caveats about using
- this pointer. In short, you can say
-
- char szBuf[500];
- CString strFoo;
- char *pszFoo;
-
- strFoo = "Green Day Concert"; // assign from char *
- pszFoo = strFoo; // convert to const char *
- strcpy (szBuf, (const char *) strFoo); // similarly
-
- > 5. It looks like radio buttons are treated in a "dumb" fashion
- > by the dialog resource editor and the AppWizard. It seems that
- > it is the application's responsibility to see that one button
- > is turned on and turn the others off before updating data. Is
- > that right?
-
- I don't think so. Check out CCmdUI::SetRadio().
-
- /\/\----
- Martin Pool
- BE(Computer Systems) Yr 3, University of Queensland
- http://student.uq.edu.au/~e4329203
-
- C, C++, Windows, Unix proto-guru
-
- "[Walt Disney] wanted to have a dress code for his community, and a
- behaviour code: residents could be evicted for being drunk in public or
- cohabiting before marriage. He would outlaw, amongst other things,
- pets, unemployment, and voting." [New Scientist 20 Jan 96 pg 36]
-